package feign;

import entity.sparemanage.vo.PeopleVo;
import entity.sparemanage.vo.wareVo;
import entity.system.CodeRules;
import entity.system.DepartmentManagement;
import entity.system.SupplierManagement;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


@FeignClient(name = "system",path = "/system")
public interface systemFeign {

    /* *
     * @Author: beisheng
     * @Descriprion: 根据规则名称查询规则详细信息
     * @Date: 2023/5/23 11:13
     * @Return: entity.system.CodeRules
     * @Param: [codeRule]
     */

    @GetMapping("/code-rules/selAllRules")
    CodeRules selAllRules(@RequestBody String codeRule);

    /* *
     * @Author: beisheng
     * @Descriprion: 根据仓库ID查询仓库信息
     * @Date: 2023/5/29 8:29
     * @Return: entity.sparemanage.vo.wareVo
     * @Param: [id]
     */

    @GetMapping("/warehouse-management/selOneWareHouse")
    wareVo selOneWareHouse(@RequestBody Integer id);

    /* *
     * @Author: beisheng
     * @Descriprion: 根据人员ID查询人员信息及部门
     * @Date: 2023/5/29 8:29
     * @Return: entity.sparemanage.vo.PeopleVo
     * @Param: [id]
     */

    @GetMapping("/people-management/selOnePeople")
    PeopleVo selOnePeople(@RequestBody Integer id);

    /* *
     * @Author: beisheng
     * @Descriprion: 根据供应商ID查询供应商
     * @Date: 2023/5/29 8:28
     * @Return: entity.system.SupplierManagement
     * @Param: [id]
     */

    @GetMapping("/supplier-management/selOneSuppById")
    SupplierManagement selOneSuppById(@RequestBody Integer id);

    /* *
     * @Author: beisheng
     * @Descriprion: 根据ID查询部门信息
     * @Date: 2023/6/6 9:58
     * @Return: entity.system.DepartmentManagement
     * @Param: [id]
     */

    @PostMapping("/department-management/selOneDepartment")
    DepartmentManagement selOneDepartment(@RequestBody Integer id);
}
